
  <!-- <div class="hello">
    <h1>{{ msg }}</h1>
    <!-- <router-link to="/Hello">第一个页面</router-link>
    <router-link to="/Login">登录</router-link>
    <router-link to="/Register">注册</router-link>
    <router-link to="/Index">简历</router-link> 
  </div>  -->

  <!-- <div class="show-examples">
    <el-input
      v-model="week"
      placeholder="week"
      suffix-icon="el-icon-search"
      @change="getFiledata"
    ></el-input
    >&nbsp;
    <ElButton id = "search" type="onclick">一键查询</ElButton>
    <el-table :data="fileData" style="width: 100%">
      <el-table-column label="#" prop="id" width="180"> </el-table-column>
      <el-table-column label="电影名字" prop="fileName"></el-table-column>
    </el-table>
  </div> -->




<template>
  <div id="get_fileData">
    <button @click="GetFileData">获取电影数据</button>
    <table class="table table-bordered table-hover table-striped">
      <thead>
        <tr>
          <td>id</td>
          <td>电影名字</td>
          <td>电影地址</td>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item, index) of data" :key="item.pk">
          <td>{{ item.pk }}</td>
          <td>{{}}</td>
          <td></td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "get_fileData",
  data() {
    return {
      data: [],
    };
  },

  methods: {
    GetFileData: function () {
      var url = "";
      axios.get(url).then((Response) => {
        if (Response.data.status == 1) {
          this.data = Response.data.msg;
          console.log(Response.msg);
          console.log("成功");
        } else {
          console.error("失败");
        }
      });
    },
  },
  mounted: function () {
    this.GetFileData();
  },
};
</script>
